﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Globalization;

/// <summary>
/// Summary description for User
/// </summary>
/// 
//Class user for hold information for user
public class User
{   
    //variable for hold ID of user
    long lngID;
    //variable for hold string MAC of user's machine
    private String strMAC;
    //variable for hold time when user's checked
    private DateTime dtmTimeLog;
    //Get current time (time from server)
    static DateTime GetCurrentTime()
    {
        //get current time
        DateTime dtmTime = DateTime.Now;
        //return time was got
        return dtmTime;
    }
    //Contructor of user
	public User()
	{
        //Assign current time for timelog of user 
        dtmTimeLog = GetCurrentTime();
		//
		// TODO: Add constructor logic here
		//

	}
    //Assign 2 parameters for user, ID and MAC address
    public User(long lngID, String sMAC)
    {
        this.lngID = lngID;
        this.strMAC = sMAC;
        this.dtmTimeLog = GetCurrentTime();

    }

    //Return ID of USer
    public long GetID()
    {
        return lngID;

    }
    //return MAC of User
    public String GetMAC()
    {
        return strMAC;

    }
    //Return time that user's checked
    public DateTime GetTimelog()  
    {
        return dtmTimeLog;
    }
    //Set ID for user
    public void SetID(long ID)
    {
        this.lngID = ID;

    }
    //Set time log for user
    public void SetTimelog(DateTime Time)
    {
        this.dtmTimeLog = Time;
    }
    //Set MAC for user
    public void SetMAC(String mac)
    {
        //set MAC with parameter
        this.strMAC = mac;
    }
}
